//api进行统一管理
import requests from "@/api/ajax";
import mockRequest from './mockAjax';

//reqCategoryList 获取二级分类
// export const reqCategoryList=()=>mockRequest.get('/categoryList')
export const reqCategoryList= ()=>requests({url:'/positionList',method:'get'});

//banner
export const reqGetBannerList=()=>mockRequest.get('/banner')

//获取验证码
// export const reqGetCode = (phone)=>requests({url:`/user/passport/sendCode/${phone}`,method:'get'});

//注册
export const reqUserRegister = (data)=>requests({url:'/register',data,method:'post'});

//登录
// export const reqUserLogin = (data)=>requests({url:'/user/passport/login',data,method:'post'});
export const reqUserLogin = (data)=>requests({url:'/login',data,method:'post'});

//获取用户信息【需要带着用户的token向服务器要用户信息】
// export const reqUserInfo = ()=>requests({url:'/user/passport/auth/getUserInfo',method:'get'});
export const reqUserInfo = ()=>requests({url:'/userInfo',method:'get'});

//退出登录
//URL:/api/user/passport/logout  get
// export const reqLogout = ()=> requests({url:'/user/passport/logout',method:'get'});

//获取分页
export const reqPagination = (current)=> requests({url:`/pageRecruits/${current}/15`,method:'get'});

//是否填写过简历
export const reqHasResume = ()=> requests({url:`/hasResume`,method:'get'});

//智能简历匹配打分
export const reqMatchResume = ()=> requests({url:`/matchResume`,method:'get'});

//获取我的简历
export const reqMyResume = ()=> requests({url:`/myResume`,method:'get'});

//编辑基本信息
export const reqResumeBaseInfo = (data)=> requests({url:`/resumeBaseInfo`,data,method:'put'});

//编辑核心信息
export const reqResumeCoreInfo = (data)=> requests({url:`/resumeCoreInfo`,data,method:'put'});

//新增基本信息
export const reqAddResumeBaseInfo = (data)=> requests({url:`/resumeBaseInfo`,data,method:'post'});

//新增核心信息
export const reqAddResumeCoreInfo = (resumeId,data)=> requests({url:`/resumeCoreInfo/${resumeId}`,data,method:'post'});

//投递简历
export const reqSubmitResume = (recruitId)=> requests({url:`/submitResume/${recruitId}`,method:'post'});

//获取二级菜单岗位
export const reqPageRecruitsByPost = (current,post)=> requests({url:"/pageRecruitsByPost/"+current+"/15/"+post,method:'get'})

//企业用户登录
export const reqEnterpriseLogin = (data)=>requests({url:'/enterpriseLogin',data,method:'post'});

//企业用户注册
export const reqEnterpriseRegister = (data)=>requests({url:'/enterpriseRegister',data,method:'post'});

//获取企业用户信息【需要带着用户的token向服务器要用户信息】
export const reqEnterpriseUserInfo = ()=>requests({url:'/enterpriseUserInfo',method:'get'});

//获取所有投递简历
export const reqPageResumes = (current)=> requests({url:`/pageResumes/${current}/15`,method:'get'});

//显示企业信息
export const reqDisplayInfo = ()=> requests({url:`/displayInfo`,method:'get'});

//获取企业招聘信息
export const reqRecruits = ()=> requests({url:`/recruits`,method:'get'});

//新增企业招聘信息
export const reqRecruit = (data)=> requests({url:`/recruit`,data,method:'post'});

//企业用户查看详细简历
export const reqResume = (resumeId)=> requests({url:`/resume/${resumeId}`,method:'get'});

//新增企业信息
export const setDisplayInfo = (data)=> requests({url:`/displayInfo`,data,method:'post'});